home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 4: Demo 1
/
almathera_demo1.bin
/
amos
/
random numbers.amos
/
random numbers.amosSourceCode
Wrap
AMOS Source Code
|
1995-03-16
|
595b
|
21 lines
Dim N(21)
ST:
Locate 2,1 : Print "Selecting 20 different numbers"
Locate 2,3 : Input "Press Return to Select Numbers";A$
Cls 1
Randomize Timer
SA:
Rem This decide show many numbers are selected
For D=1 To 20
Rem this gives the total from which numbers are slected
N=Int(Rnd(50))+1 : FLAG=0
For H=1 To D-1
If N(H)=N Then FLAG=1 : H=D
Next H
Rem this checks to see if a number has already been chosen
If FLAG=1 Then Goto SA
N(D)=N
Next D
Locate 2,6 : Print N(1);N(2);N(3);N(4);N(5);N(6);N(7);N(8);N(9);N(10)
Locate 2,8 : Print N(11);N(12);N(13);N(14);N(15);N(16);N(17);N(18);N(19);N(20)
Goto ST